﻿/*本本头文件中描述了一些常用的数据结构，例如连表，
点，矩开等数据结构，如果在不自行定义的情况下，想
使用这些结构，只需在工程中包含该头文件即可*/
#ifndef __CTYPE__
#define __CTYPE__

class Point{
public:
      int x;
      int y;
public:
  Point(int x,int y){
      this->x=x;
      this->y=y;
  }
};

class Rectangle{
public:
      int xstart;
      int ystart;
      int width;
      int height;
      unsigned char fillcolor;
      unsigned char linewidth;
public:
  Rectangle(int xstart,int ystart,int width,int height,unsigned char fillcolor=0x00,unsigned linewidth=0x00){
      this->xstart=xstart;
      this->ystart=ystart;
      this->width=width;
      this->height=height;
      this->fillcolor=fillcolor;
      this->linewidth=linewidth;
  }
};


class Line{
public:
      int xstart;
      int ystart;
      int xstop;
      int ystop;
public:
  Line(int xstart,int ystart,int xstop,int ystop){
      this->xstart=xstart;
      this->ystart=ystart;
      this->xstop=xstop;
      this->ystop=ystop;
  }
};

class WaveLine{
public:
      int height;
      int xstart;
      int ystart;
      int length;
      bool vertical;
public:
  WaveLine(int xstart,int ystart,int length,int height,bool vertical){
      this->xstart=xstart;
      this->ystart=ystart;
      this->height=height;
      this->length=length;
      this->vertical=vertical;
  }
};
class Circle{
public:
      int xstart;
      int ystart;
      int radius;
      float linewidth;
public:
  Circle(int xstart,int ystart,int radius,float linewidth=0.5){
      this->xstart=xstart;
      this->ystart=ystart;
      this->radius=radius;
      this->linewidth=linewidth;
  }
};

#endif
